home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 11 / Amoszine 11 (Disk 2 of 2).adf / Various_Source.lha / unlocker.amos / unlocker.amosSourceCode
Encoding:
AMOS Source Code  |  1996-03-06  |  2.1 KB  |  81 lines

  1. '----------------------------------------------------------------------------
  2. '
  3. ' AMOS Procedure UnLocker, by Gary Symons, AMOS 1.2 and over ONLY!   
  4. '
  5. '----------------------------------------------------------------------------
  6. 'This program must be put at the beginning of programs with locked 
  7. 'procedures and run.When finished delete this bit from your program  
  8. 'and it will work as before with procedures unlocked.
  9. 'This program must not be run as an accessory! 
  10. '----------------------------------------------------------------------------
  11. '
  12. '
  13. ' This has proved to be one of the most useful routines I've ever come across
  14. ' in a long time. How many listings have ya seen that cannot be read via your
  15. ' Amos Interpreter? Quite a few. Ya know, the Procs can't be unfolded and you
  16. ' really wanted to know how it was written etc.
  17. '
  18. ' Well, now you can. It's easy.  
  19. '
  20. ' Just merge a locked proggy listing after the gumf below and run. 
  21. '  
  22. ' Then delete all this gumf and Hey Prsto! (poof) you can now open up all
  23. ' those procs! I've even been able to make demo versions of code into the
  24. ' full release using this (No I won't tell you which proggies!!!)
  25. '
  26. ' Enjoy .... AG for Az March 1996
  27. '
  28. ' PS Works fine with my copy of Amos Pro V2 running on HD and A1200 :^)
  29. '
  30. '
  31. '
  32. Default Palette 0,0,$FFF,0
  33. Screen Open 7,640,72,4,Hires : Curs Off 
  34. Screen Display 7,,100,,
  35. Centre At(,2)+Border$("   AMOS Procedures Unlocker   ",1)
  36. Locate 0,5
  37. '
  38. If Areg(3)=0
  39.    Centre "Sorry! I only work with AMOS 1.2 and over!"
  40.    BYEBYE
  41. End If 
  42. '
  43. If Dreg(0)<>0
  44.    Centre "You must not call me as an accessory!"
  45.    BYEBYE
  46. End If 
  47. '
  48. UNLOCKIT
  49. BYEBYE
  50. End 
  51. '
  52. Procedure UNLOCKIT
  53.    AD=Areg(3)
  54.    TKPROC=$376
  55.    Do 
  56.       L=Peek(AD)*2
  57.       Exit If L=0
  58.       If Deek(AD+2)=TKPROC
  59.          P=Deek(AD+10)
  60.          If Btst(15,P)
  61.             Doke AD+10,0
  62.             Inc TT
  63.          End If 
  64.       End If 
  65.       AD=AD+L
  66.    Loop 
  67.    If TT
  68.       A$="I have unlocked"+Str$(TT)+" procedure"
  69.       If TT>1 : A$=A$+"s" : End If 
  70.       A$=A$+"."
  71.    Else 
  72.       A$="No procedures to unlock!"
  73.    End If 
  74.    Centre A$
  75. End Proc
  76. '
  77. Procedure BYEBYE
  78.    Print : Print 
  79.    Centre "Press any key"
  80.    Wait Key : Screen Close 7 : Edit 
  81. End Proc